<?php
namespace app\service;
use app\model\AdminModel;
use think\facade\Db;
class UpdateFileService
{
    //上传所需配置信息
    private $config;
    //上传哪个平台
    private $name;
    //上传类型
    private $type;
    //上传时候验证
    private $validate;
    private function __construct($name,$type){
        $this->config = config('updateFile.'.$name.'.config');
        $this->validate = config('updateFile.'.$name.'.'.$type);
        $this->name = $name;
        $this->type = $type;
    }
    public static function getInstance($name='local',$type='img'){
        return new self($name,$type='img');
    }
    public function getInfo($file_name){

    }
    public function add($file='',$upload_path=''){
        dump($this->config,$this->validate,$file='',$upload_path='');
    }
    public function del($file_name){

    }
    public function getApi(){

    }
}